Skip to content

feat(motion): reveal sections on scroll in CSS, and stop shipping them hidden - #42

Merged
fajarhide merged 2 commits into
mainfrom
feat/scroll-reveal
Oct 8, 2026
Merged

fajarhide merged 2 commits into
mainfrom
feat/scroll-reveal

Conversation

@fajarhide

Copy link
Copy Markdown
Contributor

Closes #41

SectionFadeIn is a server component now. The reveal is a .reveal rule in globals.css on animation-timeline: view(), gated behind prefers-reduced-motion: no-preference and an @supports check, so a section is visible in the HTML as sent. The hero text rises once on load with the design package's duration tokens, the two product cards start a few rem apart, and the card arrow moves 2px on hover. framer-motion is removed.

Measured on the production build in headless Chromium at 1440x900:

server HTML opacity-0 count: 0            (live site today: 4)
hero children just after load: 0.00 0.00 0.00, after 1.2s: 1.00 1.00 1.00
philosophy  20px in: opacity 0.50
philosophy  60px in: opacity 0.80
philosophy 110px in: opacity 0.97
philosophy 200px in: opacity 1.00
two cards 110px in: 0.94 0.74
reduced motion, 40px in: opacity 1.00

With JavaScript disabled the page renders in full. lib/motion.test.js failed three of its four tests before the change and passes after.

Not checked: Safari, Firefox (expected to show no reveal), and any real device.

…m hidden

Every section rendered opacity-0 on the server and faded in from a
useEffect, all at once on load. The page was blank before hydration,
blank for good without JavaScript, and still on scroll.

The reveal is now a scroll timeline in globals.css behind a motion
preference and an @supports check, so SectionFadeIn is a server
component and the HTML is visible as sent. The hero text rises once on
load using the design package durations. framer-motion had no importer
and is removed.

Closes #41
@vercel

vercel Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
weekndlabs-com Ready Ready Preview Oct 8, 2026 4:47am UTC

…reveal some scale

A straight 12px rise at ease-out read as stiff. The hero text now comes
in over twice the slow token with a curve that overshoots and a blur
that clears, and scrolled sections grow from 98.5% as they rise. The
blur stays off the scroll reveal, where it would repaint a whole
section on every frame.

Refs #41
@fajarhide
fajarhide merged commit 4cf2c55 into main Oct 8, 2026
3 checks passed
@fajarhide
fajarhide deleted the feat/scroll-reveal branch October 8, 2026 04:53

This branch was successfully deployed

1 active deployment
Preview — 49db111d Deployed Oct 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sections ship hidden and fade in all at once on load, so the page is blank without JavaScript and static on scroll

1 participant